<template>
	<view class="page">
		<u-navbar title="则秀运动" border placeholder @leftClick="$utils.back()">
		</u-navbar>
		<view class="bodyBox">
			<scroll-view style="height: 100%;" scroll-y="true">
				<view class="header">
					<image src="../static/log.png" style="width: 80rpx;height: 80rpx;border-radius: 100%;" />
					<view>
						<u--text text="则秀运动"></u--text>
					</view>
				</view>
				<view class="ShopDataBox">
					<view class="title">
						常用功能
					</view>
					<u-grid :border="false" col='4' @click="clickGrid">
						<u-grid-item v-for="(item,index) in iconData" :key="index">
							<view style="height: 20rpx;" />
							<u-icon size='60rpx' :name="item.icon" :label="item.title" labelPos='bottom'
								labelSize="30rpx" labelColor='#333'></u-icon>
						</u-grid-item>
					</u-grid>
				</view>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				iconData: [{
						icon: 'account',
						title: '用户'
					},
					{
						icon: 'coupon',
						title: '订单'
					},
					{
						icon: 'calendar',
						title: '产品'
					},
					{
						icon: 'bell',
						title: '挑战'
					},
					{
						icon: 'photo',
						title: '图片'
					},
					{
						icon: 'red-packet',
						title: '充值'
					},
				],
			}
		},
		computed: {

		},
		onLoad() {


		},
		methods: {
			clickGrid(e) {
				if(e==0){
					this.$utils.navigateTo({
						url:'/shop/user/index'
					})
				}else if(e==1){
					this.$utils.navigateTo({
						url:'/shop/order/index'
					})
				}else if(e==2){
					this.$utils.navigateTo({
						url:'/shop/product/index'
					})
				}else if(e==3){
					this.$utils.navigateTo({
						url:'/shop/conquer/index'
					})
				}else if(e==4){
					this.$utils.navigateTo({
						url:'/shop/image/index'
					})
				}else if(e==5){
					this.$utils.navigateTo({
						url:'/shop/order/recharge'
					})
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	.page {
		display: flex;
		height: 100vh;
		flex-direction: column;
		box-sizing: border-box;
		background: url('@/static/image/bg.png');
	}

	.header {
		height: 10%;
		display: flex;
		align-items: center;
		width: 94vw;
		margin: 20rpx auto;

		>view:nth-child(2) {
			flex: 1;
			display: flex;
			flex-direction: column;
			height: 80rpx;
			margin-left: 20rpx;
		}

	}

	.ShopDataBox {
		min-height: 30%;
		width: 98%;
		border-radius: 8rpx;
		box-shadow: 0 0 10rpx #ddd;
		background-color: #fff;
		padding: 20rpx 40rpx;
		box-sizing: border-box;

		width: 94vw;
		margin: 20rpx auto;

		.title {
			font-size: 34rpx;
		}

		.size13 {
			font-size: 26rpx;
		}
	}

	.bodyBox {
		flex: 1;
		overflow: hidden;
	}
</style>